home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / comm / fido / jamwlng.lha / welmat.lng < prev   
Text File  |  1992-09-24  |  22KB  |  782 lines

  1. ; jammer
  2.  
  3. ; $Header: mail:welmat.lng 09/22/92 17:08:49 
  4.  
  5.  ; Just in case a null Jump is SubJump'd ;-)
  6.   PutLog "[-$(line)] $<time> You Goofed up your config!  -Bad Jump!"
  7.   Return
  8.  
  9.  ; Temporary Logging Kludge
  10.  logit:
  11.    PutLog "[$(line)] $<time> !$(ENTRY)"
  12.    Return
  13.  
  14.  TransferOut:
  15.    XprSend ""
  16.    PutLog "[$(line)] $<time> Send Status $(RC)\n"
  17.    Print "Turn around and receive\n"
  18.    XprReceive ""
  19.    PutLog "[$(line)] $<time> Receive Status $(RC)\n"
  20.    XprClose
  21.    ReportSesStat $(RC)
  22.    Jump waitring
  23.  
  24.  TransferIn:
  25.    XprReceive ""
  26.    PutLog "[$(line)] $<time> Receive Status $(RC)\n"
  27.    Print "Turn around and send\n"
  28.    XprSend ""
  29.    PutLog "[$(line)] $<time> Send Status $(RC)\n"
  30.    XprClose
  31.    ReportSesStat $(RC)
  32.    Jump waitring
  33.  
  34.  XTransferOut:
  35.    XprSend ""
  36.    PutLog "[$(line)] $<time> Receive Status $(RC)\n"
  37.    XprClose
  38.    ReportSesStat $(RC)
  39.    Jump waitring
  40.  
  41.  XTransferIn:
  42.    XprReceive ""
  43.    PutLog "[$(line)] $<time> Send Status $(RC)\n"
  44.    XprClose
  45.    ReportSesStat $(RC)
  46.    Jump waitring
  47.  
  48.  dodial:
  49.    ModemClear
  50.    PutLog "[$(line)] $<time> Trying to connect to $(remote.address)\n"
  51.    Cmpi $(remote.domain) "UUCP
  52.    TrueJump DialNonFidoLookup
  53.    Print "A Fidonet call to $(remote.address)!\n"
  54.  
  55.  ; look up the address, and put the information in the 'stem' variable 'remote'
  56.    Address "REXX" "rexx:fidolookup.welmat $(remote.address) remote"
  57.  
  58.    Print "Address: $(remote.address) ($(remote.password))\n"
  59.    Print "Sysop  : $(remote.sysop)\n"
  60.    Print "System : $(remote.sitename)\n"
  61.    Jump dodialcheck
  62.  
  63.  DialNonFidoLookup:
  64.    Print "A Non-Fido call to $(remote.address)!\n"
  65.    Address "REXX" "rexx:uulookup.welmat $(remote.address)"
  66.    Print "Lookup Returned $(RC)\n"
  67.  
  68.  dodialcheck:
  69.    Pattern $(remote.number) ""
  70.    FalseJump dodialhavenumber
  71.    PutLog "[$(line)] $<time> I don't know the number for $(remote.address)\n"
  72.    ReportSesStat 36
  73.    Jump waitring
  74.  
  75.   dodialhavenumber:
  76.    pattern $(remote.address) nrc
  77.    FalseJump notnrcdial
  78.    setbaud 300
  79.   
  80.   notnrcdial:
  81.    Send "\n\r"
  82.    Delay 1
  83.    SmartSend "$(Dial)$(remote.number)|"
  84.    SetSlaveState o
  85.    GetResponse 90
  86.    TrueJump dialtimeout
  87.    pattern $(event) "CONNECT"
  88.    TrueJump callconnect
  89.    pattern $(event) "RING"
  90.    TrueJump ring
  91.    pattern $(event) "NO DIAL TONE"
  92.    TRUEJUMP ring
  93.    PutLog "[$(line)] $<time> $(lastresponse)\n"
  94.    pattern $(event) "BUSY"
  95.    FalseJump dodial3
  96.    set temp 5
  97.    Jump  dodial3
  98.   dialtimeout:
  99.    set temp $(RC)
  100.    PutLog "[$(line)] $<time> Dial Timeout Error: $(temp)\n"
  101.   dodial3:
  102.    PutLog "[$(line)] $<time> Session result $(temp)\n"
  103.    ReportSesStat $(temp)
  104.    Jump waitring
  105.  
  106.  callconnect:
  107.    cmp $(baud) 0
  108.    FalseJump continueconnect
  109.    set baud 300
  110.    ; ya allow 300bps connects (for the NRC connection)
  111.  
  112.   continueconnect:
  113.    PutLog "[$(line)] $<time> $(lastresponse) ($(baud))\n"
  114.    Pattern $(remote.domain) "UUCP"
  115.    TrueJump callconnectUUCP
  116.  
  117. ; FidoConnect
  118.  
  119.    PutLog "[$(line)] $<time> Fidonet Call to $(remote.address)\n"
  120.    set MinSendPri 0 MaxSendPri 127
  121.    set called $(remote.address)
  122.    Connected $(called)
  123.    GetOutbound
  124.    PutLog "[$(line)] $<time> GetOutbound: $(event) Wzcap:$(host.wzcap)\n"
  125.    Cmpi $(event) WAZOO
  126.    FalseJump callconnectFTS1
  127.    cmpi $(called) $(remote.address)
  128.    TrueJump Fidoconnect2
  129.    PutLog "[$(line)] $<time> Called $(called) and got $(remote.address)\n"
  130.  
  131.  Fidoconnect2:
  132.    set IsOutbound TRUE
  133.    SubJump wazoo
  134.    set IsOutbound FALSE
  135.    cmpI $(remote.address) "fidonet#1:163/109.0"
  136.    truejump NotAddFreq
  137.    cmpI $(remote.address) "fidonet#1:163/211.0"
  138.    truejump NotAddFreq
  139.    cmpI $(remote.address) "fidonet#1:163/282.0"
  140.    truejump NotAddFreq
  141.    cmpI $(remote.address) "fidonet#1:163/99.0"
  142.    truejump NotAddFreq
  143.    cmpI $(remote.address) "fidonet#1:163/524.0"
  144.    truejump NotAddFreq
  145.    System "echo >>out:$(remote.zone).$(remote.net).$(remote.node).$(remote.point).req files"
  146.  
  147.  NotAddFreq:
  148.    FindFreq $(called)
  149.  
  150.     CheckTestOut:
  151.     cmpi $(host.wzcap) 64
  152.     FalseJump CheckZapOut
  153. ;    XprSetup testing protocol
  154. ;    Putlog "[$(line)] $<time> Test Setup $(Setup) RC:$(RC)\n"  
  155. ;    Jump TransferOut
  156.  
  157.     CheckZapOut:
  158.     cmpi $(host.wzcap) 8
  159.     FalseJump CheckZipOut
  160.      SetMailerFlags "DN,PN"
  161.      XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,NY,M8192 
  162.      PutLog "[$(line)] $<time> ZedZap Setup $(Setup) RC:$(RC)\n"
  163.      Jump TransferOut
  164.  
  165.     CheckZipOut:
  166.     cmpi $(host.wzcap) 4
  167.     FalseJump CheckInternalOut
  168.      SetMailerFlags "DE,PN"
  169.      XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,M1024 
  170.      PutLog "[$(line)] $<time> ZedZip Setup $(Setup) RC:$(RC)\n"
  171.      Jump TransferOut
  172.     
  173.     CheckInternalOut:
  174.     SetMailerFlags "DY,PY"
  175.      XprSetup xprfts.library "7a,ha,sa,py,fy,by"
  176. ;     XprSetup INTERNAL ""
  177.      PutLog "[$(line)] $<time> DietIFNA Setup $(Setup) RC:$(RC)\n"
  178.      Jump XTransferOut
  179.  
  180. callconnectFTS1:
  181.    Cmpi $(event) FTS1
  182.    FalseJump callconnectFAIL
  183.  
  184.    SetMailerFlags "DY,PY"
  185.    XprSetup xprfts.library "7a,ha,sa,py,fy,by"
  186. ;   XprSetup INTERNAL ""
  187.    PutLog "[$(line)] $<time> FTS-1 Setup $(Setup) RC:$(RC)\n"
  188.    Jump XTransferOut
  189.    
  190. callconnectFAIL:
  191.    ReportSesStat 99
  192.    Jump waitring
  193.  
  194. callconnectUUCP:
  195.    Pattern $(remote.address) "bbs#?"
  196.    FalseJump notbbs
  197.    PutLog "[$(line)] $<time> Term Call to $(remote.address)\n"
  198.    system "execute mail:ncomm"
  199.    ReportSesStat 0
  200.    Jump waitring
  201.    notbbs:
  202.    cmpI $(remote.address) nrc
  203.    FalseJump yauucp
  204.    PutLog "[$(line)] $<time> Connected to National Research Council - Getting Time\n"
  205.    xprsetup xprnrc.library "y1992,o-5"
  206.    System "date >env:date"
  207.    xprreceive ""
  208.    xprclose
  209.    System "setclock save"
  210.    System "date >env:date"
  211.    PutLog "[$(line)] $<time> Set Clock to - ${date}"
  212.    ReportSesStat 0
  213.    SetBaud 38400
  214.    Jump waitring
  215.  
  216.   yauucp:
  217.    PutLog "[$(line)] $<time> UUCP Call to $(remote.address)\n"
  218.    Delay 1
  219.  ; Generic shell execution
  220.    Send "\n"
  221.    Delay 1
  222.    System "uucp:uucico -o -s$(remote.address) -DEVICE $(device) -UNIT $(unit)"
  223.    set Return $(RC)
  224.    System "dlg:cronevent >nil: a 0 execute mail:uuxqt"
  225.    ReportSesStat $(Return)
  226.    Jump waitring
  227.  
  228.  freeline:
  229.    Print "Trying to Free Line\n"
  230.  ; close the modem to allow for another device to grab the line
  231.    ModemClose
  232.    Delay 3
  233.  
  234.  slaveloop:
  235.    ModemOpen
  236.  ; what about if it fails?  Maybe just exit the slave with a RETURN?
  237.  
  238.  waitring:
  239.    SetBaud $(BaudLocked) 
  240.    PutLog "[$(line)] $<time> Waiting for Call...\n"
  241.    FlushLog
  242.  
  243.  MainWaitLoop:
  244.    ModemInit
  245.    FalseJump freeline
  246.    CheckCall
  247.    TrueJump dodial
  248.  
  249.    set RC $<abort>
  250.    FalseJump waitring1
  251.      PutLog "[$(line)] $<time> Exiting Slave\n"
  252.      ModemClose
  253.      Return
  254.  
  255.  waitring1:
  256.    SubJump setglobals
  257.    SetSlaveState w
  258.    set OwnDevUnit TRUE
  259.    GetResponse 30
  260.    set resp $(rc)
  261.    Cmp $(resp) 2
  262.    TrueJump freeline
  263.    set rc $(resp)
  264.    TrueJump MainWaitLoop
  265.    set OwnDevUnit FALSE
  266.  
  267.    CmpI $(event) "ring"
  268.    FalseJump MainWaitLoop
  269.  
  270.    ring:
  271.    SmartSend $(Answer)
  272.    PutLog "[$(line)] $<time> $(lastresponse)\n"
  273.  
  274.    SetSlaveState i
  275.    GetResponse 90
  276.    TrueJump MainWaitLoop
  277.  
  278.    pattern $(event) "CONNECT"
  279.    TrueJump WaitRingConnect
  280.    Pattern $(event) "FAX"
  281.    FalseJump MainWaitLoop
  282.    PutLog "[$(line)] $<time> Fax Call.\n"
  283.  
  284.  ; Insert FAX software here...
  285.  
  286.    Jump waitring
  287.  
  288.  WaitRingConnect:
  289.  
  290.    set host.sysop "James McOrmond"
  291.    set host.sitename "Jammys Amiga Corner: Welmat MegaTester"
  292.    set MaxSendPri 127 MinSendPri -127
  293.    PutLog "[$(line)] $<time> $(lastResponse)($(baud))\n"
  294.  
  295.    Delay 3
  296.  
  297.    ModemClear
  298.    System "date >env:ledate"
  299.    set temp "\r\n$(lastResponse) on ${ledate}"
  300.    Print $(temp)
  301.    Send $(temp)
  302.  mconnect:
  303.    set temp "\r\nWelcoming you with ${WelmatName}\r\nJammys Amiga Corner - $(modem)\r\nFidoNet#1:163/165.0 - UUCP: Jammys.OCUnix.On.Ca\n\rType ? for Help, No User Login: "
  304.    Print $(temp)
  305.    Send $(temp)
  306.    Clear temp
  307.  
  308.  ; check for the inbound event (YooHoo,Login,FTS1,etc)
  309.  
  310.    GetInbound
  311.    PutLog "[$(line)] $<time> Event: $(event) NameBuf: $(namebuf) Wzcap:$(host.wzcap)\n"
  312.    Pattern $(event) LOGIN
  313.    FalseJump mconnect2
  314.      pattern $(namebuf) ""
  315.      TrueJump mconnect
  316.      set UserName $(namebuf)
  317.      clear namebuf
  318.      CmpI $(UserName) uuatronx
  319.      TrueJump UULogin
  320.      CmpI $(UserName) uuqpoint
  321.      TrueJump UULogin
  322.      CmpI $(UserName) ?
  323.      TrueJump LoginType
  324.      CmpI $(UserName) info
  325.      TrueJump LoginType
  326.      CmpI $(UserName) system
  327.      TrueJump LoginType
  328.      CmpI $(UserName) version
  329.      TrueJump LoginType
  330.      CmpI $(UserName) future
  331.      TrueJump LoginType
  332.      CmpI $(UserName) magic
  333.      TrueJump LoginType
  334.      CmpI $(UserName) sale
  335.      TrueJump LoginType
  336.      CmpI $(UserName) off
  337.      TrueJump LoginType
  338.      CmpI $(UserName) g
  339.      TrueJump LoginType
  340.      CmpI $(UserName) term
  341.      TrueJump ZSendTerm
  342.      CmpI $(UserName) olr
  343.      TrueJump ZSendOlr
  344.      CmpI $(UserName) list
  345.      TrueJump ZSendfilelist
  346.      CmpI $(UserName) new
  347.      TrueJump ZSendnewfiles
  348.      CmpI $(UserName) mods
  349.      TrueJump ZSendmods
  350.      CmpI $(UserName) freq
  351.      TrueJump Promptfreq
  352.      Pattern $(UserName) bbs
  353.      TrueJump LoginType
  354.  
  355.      Jump mconnect
  356.  
  357.    bbslaunch:
  358.      System "Execute the BBS"
  359.      jump waitring
  360.  
  361.    UULogin:
  362.      System "point:login <null: >null: -b$(baud) -asdg -lower -ologs:login.log -puulib:uupasswd -d$(device) -u$(unit) \"$(UserName)\""
  363.      PutLog "[$(line)] $<time> UULogin: $(RC)\n"
  364.      System "dlg:cronevent >nil: a 0 execute mail:uuxqt"
  365.      Jump waitring
  366.  
  367.    LoginType:
  368.      System "point:login <null: >null: -b$(baud) -asdg -nocheckbad -lower -ologs:login.log -puulib:passwd -d$(device) -u$(unit) \"$(UserName)\""
  369.      PutLog "[$(line)] $<time> Returned: $(RC)\n"
  370.      Pattern $(UserName) "off"
  371.      TrueJump waitring
  372.      Pattern $(UserName) "g"
  373.      TrueJump waitring
  374.      Pattern $(UserName) "xbbs"
  375.      TrueJump waitring 
  376.     Jump mconnect
  377.  
  378.    Promptfreq:
  379.      set temp "\r\nBatch Download of Files.  Enter one name per line.\r\n\r\n"
  380.      send $(temp)
  381.      print $(temp)
  382.      connected fidoNet#999:1/1.1
  383.      System "delete t:freq-$(line).req"
  384.      set counter FALSE
  385.    Promptfreqprompt:
  386.      set temp "Enter Filename to Download: "
  387.      send $(temp)
  388.      print $(temp)
  389.      GetInbound
  390.      CmpI $(namebuf) ""
  391.      FalseJump Promptfreqadd
  392.      set RC $(counter)
  393.      TrueJump Promptdofreq
  394.      jump mconnect
  395.   
  396.    Promptfreqadd:
  397.      set counter TRUE
  398.      System "echo >>t:freq-$(line).req $(namebuf)"
  399.      Jump Promptfreqprompt
  400.  
  401.    Promptdofreq:
  402.      set temp "Scanning for file(s)"
  403.      PutLog "[$(line)] $<time> $(temp)\n"
  404.      Send "\r\n$(temp)\r\n"
  405.      System "run point:wnotify point:wnotify.cfg freq-$(line).req t:freq-$(line).req fidonet#999:1/1.1 1 $(baud)"
  406.      Delay 2
  407.      set temp "Sending file(s) with Batch Zmodem\n\r\n\r"
  408.      print $(temp)
  409.      send $(temp)
  410.      clear temp
  411.      PutLog "[$(line)] $<time> Starting Batch Send\n"
  412.      XprSetup xprzedzap.library "TN,ON,B16,F0,E30,AN,DN,KN,SY,RN,M1024"
  413. ;     XprSetup xprymodem.library ""
  414.      XprSend ""
  415.      PutLog "[$(line)] $<time> Finished Batch Send\n"
  416.      XprClose
  417.      Jump mconnect
  418.  
  419.    ZSendTerm:
  420.      set promptfile "file:1000/term89.lha"
  421.      Jump PromptZSend
  422.  
  423.    ZSendOlr:
  424.      set promptfile "file:1000/gpreader16.lha"
  425.      Jump PromptZSend
  426.  
  427.    ZSendfilelist:
  428.      set promptfile "file:91/jamfiles.lha"
  429.      Jump PromptZSend
  430.  
  431.    ZSendnewfiles:
  432.      set promptfile "file:91/jamnew.lha"
  433.      Jump PromptZSend
  434.  
  435.    ZSendmods:
  436.      set promptfile "file:91/mods.lha"
  437.  
  438.    PromptZSend:
  439.      set temp "\r\n\r\nSending '$(promptfile)' with Zmodem Batch\n\r"
  440.      print $(temp)
  441.      send $(temp)
  442.      PutLog "[$(line)] $<time> ZSend '$(promptfile)'\n"
  443.      XprSetup xprzedzap.library "TN,ON,B16,F0,E30,AN,DN,KN,SY,RN,M1024"
  444. ;     XprSetup xprymodem.library ""
  445.      XprSend $(promptfile)
  446.      PutLog "[$(line)] $<time> ZSent '$(promptfile)' $(cps) cps ($(cpsp)%)\n"
  447.      Send "\n\r\n\r$(filestatus): $(cps) CPS ($(cpsp)%) of $(baud) Bps\n\r\n" 
  448.      XprClose
  449.      Jump mconnect
  450.  
  451.    mconnect2:
  452.    cmpi $(event) FTS1
  453.    FalseJump mconnect3
  454.      SetMailerFlags "DY,PY"
  455.      Set remote.address 1:1/1.1
  456.      XprSetup xprfts.library "7a,ha,sa,py,fy,by"
  457. ;     XprSetup INTERAL ""
  458.      PutLog "[$(line)] $<time> Setup $(Setup) RC:$(RC)\n"
  459.      XprReceive ""
  460.      PutLog "[$(line)] $<time> Send $(RC)\n"
  461.      XprClose
  462.      Print "Session Stat: $(RC)\n"
  463.      PutLog "[$(line)] $<time> Session result $(RC)\n"
  464.      ReportSesStat $(RC)
  465.      Jump waitring
  466.  
  467.    mconnect3:
  468.    Cmpi $(event) GOTYOOHOO
  469.    FalseJump mconnect4
  470.     SubJump wazoo
  471.     FalseJump waitring
  472.     WazooRespond
  473.     Print "Wazoo $(event)\n"
  474.     Cmpi $(event) 2U2
  475.     FalseJump waitring
  476.     Connected $(remote.address)
  477.  
  478.     CheckTestIn:
  479.      cmpi $(host.wzcap) 64
  480.      FalseJump CheckZapIn
  481. ;     XprSetup testing protocol
  482. ;     Putlog [$(line) $<time> Test Setup $(Setup) RC:$(RC)\n"  
  483. ;     Jump TransferIn
  484.  
  485.     CheckZapIn:
  486.      cmpi $(host.wzcap) 8
  487.      FalseJump CheckZipIn
  488.      SetMailerFlags "dn,pn"
  489.      XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,NY,M8192 
  490.      PutLog "[$(line)] $<time> ZedZap Setup $(Setup) RC:$(RC)\n"
  491.      Jump TransferIn
  492.  
  493.     CheckZipIn:
  494.      cmpi $(host.wzcap) 4
  495.      FalseJump CheckInternalIn
  496.      SetMailerFlags "DE,pn"
  497.      XprSetup xprzedzap.library TN,ON,B16,F0,E30,AN,DN,KN,SN,RN,M1024 
  498.      PutLog "[$(line)] $<time> ZedZip Setup $(Setup) RC:$(RC)\n"
  499.      Jump TransferIn
  500.     
  501.     CheckInternalIn:
  502.      XprSetup xprfts.library "7a,ha,sa,py,fy,by"
  503. ;     XprSetup INTERNAL ""
  504.      PutLog "[$(line)] $<time> Diet Ifna Setup $(Setup) RC: $(RC)\n"
  505.      Jump XTransferIn
  506.  
  507.    mconnect4:
  508.    ReportSesStat 111
  509.    Jump waitring
  510.  
  511.  
  512.  ; called on both inbound and outbound after receiving a yoohoo
  513.  wazoo:
  514.    PutLog "[$(line)] $<time> Name : $(remote.sitename) ($(remote.address))\n"
  515.    PutLog "[$(line)] $<time> Sysop: $(remote.sysop)\n"
  516.    PutLog "[$(line)] $<time> Cap  : $(remote.wzcap), Domain: $(remote.domain)\n"
  517.    
  518.    cmp $(remote.password) ""
  519.    TrueJump wazooproducts
  520.  
  521.    PutLog "[$(line)] $<time> Pass : $(remote.password)\n"
  522.    
  523.   wazooproducts:
  524.    Address REXX "rexx:products.welmat"
  525.    set RC $(IsOutbound)
  526.    TrueReturn
  527.  
  528.    Print "Inbound Session\n"
  529.    Address REXX "rexx:fidolookup.welmat $(remote.address) test"
  530.    FalseJump wazooing
  531.    print "Node not found!\n"
  532.    Jump EndWazoo
  533.   wazooing:
  534.    Pattern $(test.password) ""
  535.    FalseJump WazooPWCheck 
  536.    PutLog "[$(line)] $<time> No Password Required!\n"
  537.    Jump EndWazoo
  538.  
  539.   WazooPWCheck:
  540.    CmpI $(test.password) $(remote.password)
  541.    TrueJump WazooPWProtected
  542.    PutLog "[$(line)] $<time> Password Error: His:'$(remote.password)' Ours:'$(test.password)'\n"
  543.    set RC FALSE
  544.    Return
  545.  
  546.   WazooPWProtected:
  547.    PutLog "[$(line)] $<time> Password Protected Session\n"
  548.  
  549.  EndWazoo:
  550.    CmpI $(remote.product) 57
  551.    TrueJump WazooTrapDoor
  552.    set RC TRUE
  553.    Return
  554.  
  555.  WazooTrapDoor:
  556.  ; Any TD system that calls me gets a free gift!
  557.  
  558.    set temp "$(remote.zone):$(remote.net)/$(remote.node).$(remote.point)"
  559.    System "point:floadd $(temp) point:Welmat.txt"
  560.    clear temp
  561.    set RC TRUE
  562.    Return
  563.  
  564.  setglobals:
  565.  ; clear temporary variables - As well as for documentation purposes, it will
  566.  ; free up some memory for ya ;-)
  567.    Clear event fts1 infile isoutbound whatrun 
  568.    Clear remfile remote.address remote.cost remote.domain remote.flags 
  569.    Clear remote.maxbaud remote.net remote.node remote.point remote.zone
  570.    Clear remote.number remote.product remote.product_maj remote.product_min 
  571.    Clear remote.sitename remote.sysop remote.wzcap remote.wzdomain remote.password
  572.    Clear test.address test.cost test.domain test.maxbaud test.net
  573.    Clear test.node test.number test.password test.point test.sitename
  574.    Clear test.sysop test.zone NameBuf OwnDevUnit UserName
  575.    Clear process Workbench RC Result2 
  576.  
  577.  ; Reset constants
  578.  
  579.  ; Inbound directory used to place inbound files - '/' required.
  580.    set inbound "work:inbound/" 
  581.    set outbound "work:outbound/"
  582.  
  583.    set pickup "TRUE" trywazoo "TRUE" tryfts1 "TRUE" freq TRUE
  584.    set wfnotify "filenotify" stack 32000
  585.  
  586.    set MaxSendPri 127 MinSendPri -127
  587.    set BufferSize        1024
  588.  
  589.  ; Variables used by ModemInit
  590.    set InitLoop          5
  591.    set InitWait          2
  592.    set Prompt            OK
  593.    set Atten        $(atten)
  594.    set HangupString $(hangupstring)
  595.    set InitString   $(initstring)
  596.  
  597.  ; internal nodelist support junk...Going Away..
  598.    set nodelist "nodelist:"
  599.    
  600.    set host.address 1:163/165.0
  601.    set host.domain "fidonet"
  602.    set host.sitename "Jammy's Amiga Corner (613)521-0648"
  603.    set host.sysop "James McOrmond"
  604.    set host.cost 0
  605.    set host.maxbaud 9600
  606.    set host.zone 1
  607.    set host.net 163
  608.    set host.node 165
  609.    set host.point 0
  610.    set host.number "613-521-0648"
  611.    set host.password "xxxxxxx"
  612.    set host.wzdomain "fidonet"
  613.  
  614.  ; Wazoo capability bits are 'added' together - 'GetOutbound' and 'GetInbound'
  615.  ; reset $(host.wzcap) to a single protocol value after a YooHoo negotiation.
  616.  ;
  617.  ; 1  - Can do fast "FTS-0001" (DietIFNA)
  618.  ; 2  - Reserved by Opus-CBCS
  619.  ; 4  - Does ZModem, 1K blocks (ZedZip)
  620.  ; 8  - Can do ZModem variant (ZedZap)
  621.  ; 16 - Can do Janus
  622.  ; 32 - reserved by FTSC
  623.  ; 64 - reserved by ftsc (testing)
  624.  ; 32768 - wazoo freq's
  625.  
  626.    set host.wzcap 13
  627.  
  628.  ; Variables used by Modem routines (Mopen, etc)
  629.    set device $(device) unit $(unit) serflags $(serflags)
  630.    set Baud         $(baud)
  631.    set BaudLocked   $(baudlocked)
  632.    set DTR_Control  $(dtr_control)
  633.    set Locked       $(locked)
  634.    set SlowModem    $(slowmodem)
  635.    set Dial         $(dial)
  636.    set Answer       $(answer)
  637.    set Modem        $(modem)
  638.  
  639.    set postinbound postinbound postoutbound postoutbound
  640.    set preinbound preinbound preoutbound preoutbound
  641.    Return
  642.  
  643.   preinbound:
  644.     PutLog "[$(line)] $<time> Receiving: '$(remfile)'\n"
  645.     Return
  646.  
  647.   postinbound:
  648.     PutLog "[$(line)] $<time> $(filestatus): '$(remfile)' ($(filesize) bytes)\n"
  649.     PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%)\n"
  650.     falseReturn
  651.     set whatrun "Run point:wnotify >>logs:wnotify.log point:wnotify.cfg $(remfile) $(infile) \"$(remote.address)\" $(line) $(baud)"
  652.     PutLog "[$(line)] $<time> $(whatrun)\n"
  653.     system $(whatrun)
  654.     Return
  655.  
  656.   preoutbound:
  657.     PutLog "[$(line)] $<time> Sending: $(remfile) ($(filesize) bytes)\n"
  658.     Return
  659.  
  660.   postoutbound:
  661.     PutLog "[$(line)] $<time> $(filestatus): $(localfile)\n"
  662.     PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%)\n"
  663.     Return
  664.  
  665.  
  666.  ; This is the startup program ran by my first slave
  667.  startup-1:
  668.    set device "serial.device" unit 0 serflags 4
  669.  
  670.  startup-1a:
  671.    SetStatus "RAW:717/220/383/70/Line #$(line) - USR 14400 V32bis/inactive/close"
  672.    set modem "USRobotics V32bis/V42bis/HST 14400 Modem"
  673.  
  674.  ; Set up the response strings for GetResponse - These are 'line specific'.
  675.  ;  The first parameter is the 'event'.  If it is a number, or if it is 'find',
  676.  ; then it is a special event called 'CONNECT' where the baud rate is set to
  677.  ; the number, or figured out from the %d value in 'find'.
  678.    AddResponse busy "BUSY"
  679.    AddResponse maid "NO CARRIER"
  680.    AddResponse line "NO DIAL TONE"
  681.    AddResponse line "CONNECT|"
  682.    AddResponse find "CONNECT %d"
  683.    AddResponse ring "RING"
  684.  
  685.    set Baud              38400
  686.    set BaudLocked        38400
  687.    set Atten             ~AT|
  688.    set HangupString      ~~v~^~+++~~|AT~Z|
  689.    set InitString        ~ATz|
  690.    set DTR_Control       1
  691.    set Locked            TRUE
  692.    set SlowModem         TRUE
  693.    set Answer            |~ATA|
  694.    set Dial              ATdwt
  695.    Jump slaveloop
  696.  
  697.  ; This is the startup program ran by my second slave - Not used anymore
  698.  startup-2:
  699.    SetStatus "RAW:714/238/710/61/Line #$(line) - SmartOne 2400x/inactive"
  700.  
  701.    set modem "Best Data SmartOne 2400x Modem"
  702.    AddResponse busy BUSY
  703.    AddResponse maid "NO CARRIER"
  704.    AddResponse line "NO DIALTONE"
  705.    AddResponse line "CONNECT|"
  706.    AddResponse find "CONNECT %d"
  707.    AddResponse ring RING
  708.  
  709.  ;  Device and Unit for the serial port.
  710.  ; Serial flags are added together to get value desired.
  711.  ;  1 PARITY on
  712.  ;  2 Parity Odd
  713.  ;  4 7-Wire Modem (RTS/CTS)
  714.  ;
  715.  ;  Device is automatically opened in SHARED mode with the XON/XOFF handling
  716.  ;  disabled
  717.    set device "serial.device" unit 0 serflags 4
  718.  
  719.    set Atten             ~AT|
  720.    set Baud              2400
  721.    set BaudLocked        2400
  722.    set DTR_Control       0
  723.    set HangupString      ~+~+~+~~~ATH|
  724.    set InitString        atz|
  725.    set Locked            FALSE
  726.    set SlowModem         FALSE
  727.    set Answer            |~AT|
  728.    set Dial              |~ATm3DT
  729.  
  730.    Jump slaveloop
  731.  
  732.  ;  The main function called by Welmat in the MCP is 'startup' - This should
  733.  ; always be included, and is the first label called!
  734.  ; It is included at the end of the config for efficiency reasons (IT's only
  735.  ; called 'once'
  736.  startup:
  737.    Print "This is a print in the new language running under ${WelmatName}\n"
  738.  
  739.    set line M
  740.   
  741.  ; The old log system is going away, but unfortunately still exists :-(
  742.    LogInit "RAW:717/13/708/205/Log Window/inactive/close" "logs:welmat.log"
  743.    TrueJump logok
  744.    Print "Log Open Failed\n"
  745.    Return
  746.  
  747.    logok:
  748.    Print "LogFile Opened\n"
  749.    PutLog "[$(line)] $<time> Startup on $<date> with ${WelmatName}\n"
  750.  
  751.  ; Interesting way to log the output of a program...
  752.    system "version >env:version"
  753.    PutLog "[$(line)] $<time> ${version}"
  754.    set stack 32000
  755.  
  756.   Launch 1 SLAVE1 startup-1
  757. ;  Launch 2 SLAVE2 startup-2
  758.  
  759.    Print "Started $<slaves> slaves\n"
  760.    PutLog "[$(line)] $<time> Started $<slaves> slaves\n"
  761.    set RETURN 99
  762.  
  763.   eventloop:
  764.     WaitEvent 20
  765.     CheckCall
  766.     Print "CheckCall: $(RC)\n"
  767.     FalseJump eventloop1
  768.     CallForward 2
  769.     Print "CallForward call for $(remote.address): $(RC)\n"
  770.     eventloop1:
  771.  
  772.    ; If there are any slaves still active, don't exit!!
  773.    ; Currently there is a bug while exiting, so don't
  774.     set RC $<slaves>
  775.     TrueJump eventloop
  776.  
  777.  PutLog "[$(line)] $<time> Mainslave Exiting...\n"
  778.  LogEnd
  779.  set RC 0
  780.  Return
  781. ;
  782.